<template>
  <div class="goods-list">
    <h1>goods-list</h1>
    v-premission
    <br />
    <el-button v-premission="['super', 'normal']">super,normal</el-button>
    <el-button v-premission="['super']">super</el-button>
    <el-button v-premission="['normal']">normal</el-button>

    <hr />
    v-auth
    <br />
    <el-button v-auth="['super', 'normal']">super,normal</el-button>
    <el-button v-auth="['super']">super</el-button>
    <el-button v-auth="['normal']">normal</el-button>

    <!-- v-auth  -->
  </div>
</template>
<script>
export default {
  data() {
    return {}
  },
  directives: {
    auth: {
      inserted(el, binding) {
        if (!binding.value.includes('normal')) {
          el.remove()
        }
      }
    }
  }
}
</script>
<style lang="scss" scoped></style>
